CMAKE_MINIMUM_REQUIRED(VERSION 3.26)

PROJECT(client_exporter)
# 支持C++11
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -O2 -std=c11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -g -Wall -O2 -std=c++11")

MESSAGE(STATUS "project source dir: ${PROJECT_SOURCE_DIR}")

MESSAGE(STATUS "path src files: ${PATH_SRC_FILES}")

#set(PROMETHEUSDIR /home/wenxinfly/project/testprometheus/prometheuslib)

# 2. 设置包含目录和库目录。
#include_directories(${PROMETHEUSDIR}/include)

#link_directories(${PROMETHEUSDIR}/lib)

# 编译可执行程序
ADD_EXECUTABLE(client_exporter client.cpp) 

target_link_libraries(client_exporter prometheus-cpp-core prometheus-cpp-pull prometheus-cpp-push)

